package com.pai4j.domain.community.vo.request;

import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import org.springframework.util.Assert;

/**
 * @Author 程序员七七
 * @webSite https://www.coderutil.com
 * @Date 2022/12/18 14:44
 * @description
 */
@Data
public class CCAnswerSaveRequestVO {

    private Long id;

    private Long questionId;

    private String content;


    public void validate() {
        Assert.isTrue(questionId != null, "未找到问题");
        Assert.isTrue(StringUtils.isNotBlank(content), "回复内容不能为空");
    }
}
